Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade humbug/box #8770

Merged
merged 5 commits into from Nov 26, 2022
Merged

Upgrade humbug/box #8770

merged 5 commits into from Nov 26, 2022

Conversation

weirdan
Copy link
Collaborator

@weirdan weirdan commented Nov 26, 2022

This PR updates humbug/box and fixes issues with the version Psalm reports when it's built as PHAR.

Fixes #7606
Fixes #5399
Fixes #7314

Obtaining package version data from within a scoped PHAR file is a
complicated topic, and it's been alternatively broken and fixed multiple
times.

This change moves version data access to a single class, so that we can
fix it there should we need to.

The rest of the code can just rely on PSALM_VERSION constant (which will
be made unscoped in a further commit) or call `VersionUtils` methods.
It updates humbug/scoper as well, so some changes to scoper
configuration are required.

`PSALM_VERSION` and `PHP_PARSER_VERSION` constants are made unscoped to
prevent various issues.
Compatibility between `ocramius/package-versions`,
`composer/package-versions-deprecated`, `composer-runtime-api` and
`humbug/box` (with `humbug/scoper` further complicating things)has been
always a problematic area. So instead of trying to keep up with all the
changes in all of those packages, we will now bake the version data (for
the packages we need) into the PHAR file itself.

Fixes vimeo#7606
Fixes vimeo#5399
@weirdan weirdan added the release:fix The PR will be included in 'Fixes' section of the release notes label Nov 26, 2022
@weirdan weirdan merged commit c3cc906 into vimeo:master Nov 26, 2022
@weirdan weirdan deleted the upgrade-humbug-box branch November 26, 2022 04:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release:fix The PR will be included in 'Fixes' section of the release notes
Projects
None yet
1 participant